﻿using HossMvp.Core;
using System;

namespace HossMvp.Bootstrap
{
    public abstract class HossMvpBootstrapper
    {
        public virtual IPresenter<AbstractModelManager, AbstractViewManager> Start<T>(ModelManager modelManager = null
            , ViewManager viewManager = null) where T : AbstractPresenter
        {
            var args = new object[] { modelManager ?? new ModelManager(), viewManager ?? new ViewManager() };
            var presenter = (T)Activator.CreateInstance(typeof(T), args);
            return presenter;
        }
    }
}